from bs4 import BeautifulSoup as bs
html_doc = """
<html><head><title>The Dormouse's story</title></head>
<body>
<p class="title"><b>The Dormouse's story</b></p>

<p class="story">Once upon a time there were three little sisters; and their names were
<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>,
<a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and
<a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;
and they lived at the bottom of a well.</p>

<p class="story">...</p>
"""
soup=bs(html_doc,'lxml')
total=soup.prettify()
title=soup.title.string
tag_a=soup.find_all('a')
tag_a_p=soup.find_all(['a','p'])
tag_class=soup.find_all('p',class_="story")
tag_id=soup.find_all('a',id="link2")
tag_str=soup.find_all(string='Lacie')
text=soup.get_text()
content=soup.a.text
href=soup.a['href']
attrs=soup.a.attrs
